package com.zhijian.medical.service;

import com.zhijian.medical.entity.po.PersonCommissionAuthority;
import com.zhijian.medical.entity.vo.request.PersonCommissionAuthoritySaveOrUpdateVo;
import com.zhijian.medical.entity.vo.request.PersonCommissionAuthoritySearchVo;
import com.zhijian.medical.entity.vo.response.PersonCommissionAuthorityVo;
import com.zhijian.medical.util.Page;

import java.util.List;

/**
 * 人员-分级授权书 业务处理层
 *
 * @author HCG
 * @version 1.0
 * @date 2022-03-28 17:07:47
 */
public interface PersonCommissionAuthorityService {

    /**
     * 主键查询
     *
     * @param id
     * @return
     */
    PersonCommissionAuthority selectById(Long id);

    /**
     * 主键查询vo
     *
     * @param id
     * @return
     */
    PersonCommissionAuthorityVo selectVoById(Long id);

    /**
     * 按照主键删除
     *
     * @param id
     */
    void deleteById(Long id);

    /**
     * 根据项目id删除所有
     *
     * @param commissionAuthorityId
     */
    void deleteAllByCommissionAuthorityId(Long commissionAuthorityId);

    /**
     * 根据项目id删除
     *
     * @param commissionAuthorityId
     */
    void deleteByCommissionAuthorityId(Long commissionAuthorityId);

    /**
     * 新增
     *
     * @param personCommissionAuthority
     * @return
     */
    Long insert(PersonCommissionAuthority personCommissionAuthority);

    /**
     * 保存or修改all
     *
     * @param personCommissionAuthoritySaveOrUpdateVo
     * @return
     */
    boolean saveOrUpdate(PersonCommissionAuthoritySaveOrUpdateVo personCommissionAuthoritySaveOrUpdateVo);

    /**
     * 更改
     *
     * @param personCommissionAuthority
     * @return
     */
    boolean update(PersonCommissionAuthority personCommissionAuthority);

    /**
     * 总数
     *
     * @param personCommissionAuthoritySearchVo
     * @return
     */
    Integer count(PersonCommissionAuthoritySearchVo personCommissionAuthoritySearchVo);

    /**
     * 列表
     *
     * @param personCommissionAuthoritySearchVo
     * @return
     */
    List<PersonCommissionAuthorityVo> selectList(PersonCommissionAuthoritySearchVo personCommissionAuthoritySearchVo);

    /**
     * 分页查询
     *
     * @param personCommissionAuthoritySearchVo
     * @return
     */
    Page<PersonCommissionAuthorityVo> selectPage(PersonCommissionAuthoritySearchVo personCommissionAuthoritySearchVo);

    /**
     * 根据人员id与项目id查找数据
     *
     * @param personId
     * @param commissionAuthorityId
     * @return
     */
    PersonCommissionAuthority selectByPersonIdAndCommissionAuthorityId(Long personId, Long commissionAuthorityId);
}